/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：MainMenuButton.java <br>
 * 创建时间：2013-6-30 下午11:20:13 <br>
 * 所属项目：GmudTest <br>
 * @author 12548 <br>
 */
package lostland.gmud.exv2.ui;

import com.orhanobut.logger.Logger;

import lostland.gmud.exv2.FontSize;
import lostland.gmud.exv2.Game;
import lostland.gmud.exv2.blgframework.impl.BLGGraphics;
import lostland.gmud.exv2.ui.core.ArrowButton;

/**
 * 类名：MainMenuButton <br>
 * 说明：
 *
 * @author 12548
 */
public class MainMenuButton extends ArrowButton {

	static final int MARGIN_TOP = 1;
	static final int MARGIN_LEFT = 2;
	static final int WIDTH = (160 - MARGIN_LEFT * 2) / 4;
	static final int HEIGHT = 20 - 2 * MARGIN_TOP;
	static final int PADDING_TOP = 3;
	static final int PADDING_LEFT = 9;
	final String S[] = {"查看", "物品", "技能", "功能", "系统"};

	int index;

	public MainMenuButton(int index) {
		super(MARGIN_LEFT + index * WIDTH, MARGIN_TOP, WIDTH, HEIGHT);
		Logger.w("creating");
		this.index = index;
		this.bordered = false;
		this.padding_top = PADDING_TOP;
	}

	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.GmudWindow#draw()
	 */
	@Override
	public void draw() {
		drawBackground();
		BLGGraphics g = (BLGGraphics) Game.getInstance().getGraphics();
		g.drawText(S[index], x + PADDING_LEFT, y + PADDING_TOP, FontSize.FT_12PX);
	}

}
